$border-color-lighter: #dcdfe6;

.el-overlay {
  background-color: rgba(0, 0, 0, .1);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.main-container {
  .fixed-header {
    -webkit-box-shadow: none!important;
    box-shadow: none!important;
    border-right: 1px solid $border-color-lighter!important;
  }
}

.sidebar-container {
  -webkit-box-shadow: none!important;
  box-shadow: none!important;
  background: #F8FAFC !important;
  border-radius: 12px;
  margin: 20px;
  // border-right: 1px solid $border-color-lighter!important;
}

.navbar {
  box-shadow: none!important;
  // border-bottom: 1px solid $border-color-lighter;
}

.tags-view-container {
  -webkit-box-shadow: none!important;
  box-shadow: none!important;
  border-bottom: 1px solid $border-color-lighter!important;
}

.left-nav-bar {
  .sidebar-container {
    .sidebar-logo-container {
      >div {
        position: fixed;
        width: 64px;
        height: 50px;
        background: #282c34;
        padding: 5px;
        a {
          height: 100%;
          img {
            max-height: 100%;
          }
        }
      }
      .sidebar-logo-link {
        margin-left: 64px;
        width: calc(100% - 64px)!important;
        border-bottom: 1px solid $border-color-lighter;
      }
    }
    .el-menu--vertical {
      padding-top: 5px;
      margin-left: 69px;
      max-width: calc(100% - 74px) !important;
      .el-menu-item {
        height: 45px;
        line-height: 45px;
        margin-bottom: 5px;
        border-radius: var(--el-border-radius-base);
        &:hover, &.is-active {
          color: #fff !important;
          background: var(--el-color-primary-light-9) !important;
        }
      }
    }
  }
  &.hideSidebar {
    .main-container {
      margin-left: 64px!important;
      .fixed-header {
        width: calc(100% - 64px);
      }
    }
  }
}

.el-card__body {
	padding: 20px!important;
}

.search-form {
  .el-card__body {
  	padding-top: 18px!important;
  }
  
  .el-form {
    .el-form-item:not(.search-form-suffix) {
      .el-form-item__content > * {
        width: 100%;
      }
    }
    
    .el-range-editor.el-input__wrapper {
      padding: 0 10px;
    }
  }
}

.card-pb0 {
  .el-card__body {
  	padding-bottom: 0 !important;
  }
}

.page-table {
  &-header {
    .el-button {
      margin-bottom: 15px;
    }
  }
  
  .el-card__body {
    > div {
      &.el-tabs {
        margin-top: -16px;
      }
    }
  }
  
  &-card {
    display: flex;
    flex-wrap: wrap;
    margin: -10px;
    &-item {
      margin: 10px;
      position: relative;
      &-body {
        padding: 0!important;
        height: 100%;
        .el-image {
          width: 100%;
          height: 100%;
        }
        .image-slot {
          display: flex;
          justify-content: center;
          align-items: center;
          width: 100%;
          height: 100%;
          background: var(--el-fill-color-light);
          color: var(--el-text-color-secondary);
          font-size: 42px;
        }
      }
      &-title {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        max-width: 100%;
        height: 40px;
        line-height: 40px;
        font-size: 14px;
        text-align: center;
      }
      &-op {
        display: flex;
        flex-direction: column;
        .el-button {
          margin: 5px 0;
        }
      }
    }
  }
}

.hide-card {
  .page-table, .search-form {
    border: none;
    .el-card__body {
      padding: 0!important;
    }
  }
  
  .page-table {
    .el-card__body {
      > div:first-of-type {
        &.el-tabs {
          margin-top: -12px;
        }
      }
    }
  }
}

.el-tabs__nav-wrap:after {
  height: 1px!important;
}

.el-form .el-form-item__label {
	font-weight: normal;
}

.custom-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  .el-loading-spinner {
    width: auto;
    border-radius: 4px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.9);
    padding: 17px 80px;
    top: auto;
    margin-top: 0;
  }
}

.el-table .cell .el-button.is-link {
  vertical-align: baseline!important;
}

.el-table .cell .el-dropdown {
  vertical-align: baseline!important;
  margin-left: 12px;
}

.info-card-list {
  >div {
    padding: 24px 0;
    >div {
      padding-left: 8px;
      border-left: 3px solid $--color-primary;
      font-size: 15px;
      line-height: 15px;
      color: #333;
    }
    &:not(:last-of-type) {
      border-bottom: 1px dashed #eee;
    }
    >ul {
      display: flex;
      flex-wrap: wrap;
      list-style: none;
      padding: 0;
      font-size: 14px;
      margin: 0;
      >li {
        width: calc((100% - 40px) / 3);
        display: flex;
        // align-items: baseline;
        margin-top: 15px;
        &:not(:nth-child(3n)) {
          margin-right: 20px;
        }
        >span {
          &:last-of-type {
            flex: 1;
            word-break: break-all;
          }
        }
      }
    }
  }
}

.space-checkbox-group {
  .el-checkbox-button__inner {
    margin-right: 5px;
    margin-bottom: 5px;
    border: var(--el-border);
    border-radius: var(--el-border-radius-base);
  }
}

.form-detail {
  .el-form-item {
    margin-bottom: 0;
  }
}

.custom-alert {
  .el-alert__title {
    font-size: 12px;
    line-height: 16px;
    p {
      &:first-of-type {
        margin-top: 5px;
      }
      &:last-of-type {
        margin-bottom: 5px;
      }
    }
  }
}

.custom-color-picker {
  .el-color-dropdown__link-btn {
    display: none;
  }
}

.custom-radio-button-group {
  display: flex;
  border: 1px solid var(--el-color-primary-light-9);
  border-radius: var(--el-border-radius-base);
  .el-radio-button {
    flex: 1;
  }
  .el-radio-button__inner {
    display: block!important;
    border: none!important;
    margin: 1px!important;
    color: #888!important;
    font-weight: bold!important;
    box-shadow: none!important;
  }
  .el-radio-button__original-radio:checked+.el-radio-button__inner {
    background-color: var(--el-color-primary-light-9);
    color: var(--el-color-primary);
    border-radius: var(--el-border-radius-base);
  }
}

.custom-table {
  width: 100%;
  .el-table__header-wrapper th, .el-table__fixed-header-wrapper th {
    font-size: 12px;
    background-color: transparent!important;
  }
  td.el-table__cell, th.el-table__cell.is-leaf {
    border-bottom: none;
  }
  .el-table__inner-wrapper:before {
    height: 0!important;
  }
}

.text-link {
  &:hover {
    color: var(--el-color-primary);
    cursor: pointer;
    text-decoration: underline;
  }
}

.flx-center {
  display: flex;
  align-items: center;
  justify-content: center;
}
.flx-justify-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.flx-align-center {
  display: flex;
  align-items: center;
}

/* 内外边距 */
@for $i from 0 through 50 {
  .mt#{$i} {
    margin-top: #{$i}px !important;
  }
  .mr#{$i} {
    margin-right: #{$i}px !important;
  }
  .mb#{$i} {
    margin-bottom: #{$i}px !important;
  }
  .ml#{$i} {
    margin-left: #{$i}px !important;
  }
  .pt#{$i} {
    padding-top: #{$i}px !important;
  }
  .pr#{$i} {
    padding-right: #{$i}px !important;
  }
  .pb#{$i} {
    padding-bottom: #{$i}px !important;
  }
  .pl#{$i} {
    padding-left: #{$i}px !important;
  }
}